@import '~antd/es/style/variable.less';

@login-text-color: #d3d7f7;
@login-border-color: rgba(211, 215, 247, 0.2);

.loginContainer {
  position: absolute;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  .loginBgImg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .loginCanvas {
    position: absolute;
    z-index: 2;
    width: 100%;
    height: 100%;
  }
}

.loginFormContainer {
  position: absolute;
  top: 50%;
  right: 50%;
  z-index: 100;
  width: 420px;
  transform: translate(50%, -50%);
  @media screen and (max-width: @screen-lg) {
    width: 360px;
  }
  @media screen and (max-width: @screen-md) {
    width: 320px;
  }
  @media screen and (max-width: @screen-sm) {
    width: 80%;
    max-width: 360px;
    :global {
      .ant-form-item-label {
        display: none;
      }
      .ant-input,
      .ant-input-password {
        padding-left: 36px;
      }
    }
  }
  .loginPageTitle {
    position: absolute;
    top: -96px;
    left: 50%;
    width: 560px;
    text-align: center;
    transform: translateX(-50%);
    .loginPageTitleImage {
      position: relative;
      width: 176px;
      height: 64px;
      margin-right: 10px;
    }
    .loginPageTitleText {
      color: @login-text-color;
      font-weight: bold;
      font-size: 32px;
      line-height: 64px;
      text-transform: uppercase;
      vertical-align: middle;
      -webkit-text-fill-color: transparent;
      -webkit-text-stroke: 1.5px @login-text-color;
    }
  }
  .formTransferWrapper {
    position: relative;
    height: 320px;
    transform-style: preserve-3d;
    perspective: 800px;
    .formTransferPreviewItem {
      position: absolute;
      top: 50%;
      left: 0;
      width: 100%;
      &.begin {
        transition: transform 0.4s linear, opacity 0.4s linear;
      }
      &.end {
        transition: transform 0.4s linear, opacity 0.4s linear 0.2s;
      }
      &.previewActive {
        transform: translateY(-50%);
        opacity: 1;
        pointer-events: auto;
      }
      &.previewInactive {
        transform: translateY(-50%) rotate3d(0, 1, 0, 180deg);
        opacity: 0;
        pointer-events: none;
      }
      &.backActive {
        transform: translateY(-50%);
        opacity: 1;
        pointer-events: auto;
      }
      &.backInactive {
        transform: translateY(-50%) rotate3d(0, 1, 0, -180deg);
        opacity: 0;
        pointer-events: none;
      }
    }
  }
}

.validateImage {
  width: 100%;
  height: 100%;
  img {
    width: 100%;
    height: 100%;
  }
  :global {
    .ant-spin-spinning {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      .ant-spin-dot {
        margin-right: 6px;
      }
    }
  }
}
